@import '../../styles/theme.less';

.register-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 30%, #16213e 70%, #0f3460 100%);
  font-family: @font-family;
}

.register-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  .particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
      radial-gradient(2px 2px at 20px 30px, @accent-color, transparent),
      radial-gradient(2px 2px at 40px 70px, @primary-color, transparent),
      radial-gradient(1px 1px at 90px 40px, @success-color, transparent),
      radial-gradient(1px 1px at 130px 80px, @warning-color, transparent),
      radial-gradient(2px 2px at 160px 30px, @accent-color, transparent),
      radial-gradient(1px 1px at 200px 60px, @secondary-color, transparent);
    background-repeat: repeat;
    background-size: 300px 200px;
    animation: particles 25s linear infinite;
    opacity: 0.6;
  }
  
  .grid-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
      linear-gradient(rgba(102, 126, 234, 0.08) 1px, transparent 1px),
      linear-gradient(90deg, rgba(102, 126, 234, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: grid-move 15s linear infinite;
  }
}

@keyframes particles {
  0% { transform: translateY(0px) translateX(0px); }
  25% { transform: translateY(-50px) translateX(25px); }
  50% { transform: translateY(-100px) translateX(0px); }
  75% { transform: translateY(-150px) translateX(-25px); }
  100% { transform: translateY(-200px) translateX(0px); }
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.register-content {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: @spacing-lg;
}

.register-form-wrapper {
  width: 480px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: @spacing-2xl @spacing-xl;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: @radius-xl;
  box-shadow: @shadow-xl, 0 8px 32px rgba(102, 126, 234, 0.1);
  animation: float 8s ease-in-out infinite;
  position: relative;
  
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: @radius-xl;
    padding: 1px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: border-glow 3s ease-in-out infinite alternate;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-8px) scale(1.01); }
}

@keyframes border-glow {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

.register-header {
  text-align: center;
  margin-bottom: @spacing-xl;
  
  .register-title {
    font-size: @text-4xl;
    font-weight: 800;
    background: linear-gradient(135deg, @accent-color 0%, @primary-color 50%, @success-color 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: @spacing-sm;
    text-shadow: 0 0 40px rgba(102, 126, 234, 0.3);
    animation: title-glow 2s ease-in-out infinite alternate;
  }
  
  .register-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: @text-base;
    margin: 0 0 @spacing-lg 0;
    font-weight: 300;
  }
  
  .tech-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, @accent-color, transparent);
    margin: 0 auto;
    animation: line-pulse 2s ease-in-out infinite;
  }
}

@keyframes title-glow {
  0% { text-shadow: 0 0 20px rgba(102, 126, 234, 0.3); }
  100% { text-shadow: 0 0 40px rgba(102, 126, 234, 0.6), 0 0 60px rgba(118, 75, 162, 0.3); }
}

@keyframes line-pulse {
  0%, 100% { opacity: 0.5; transform: scaleX(1); }
  50% { opacity: 1; transform: scaleX(1.2); }
}

.register-form {
  .register-input {
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: @radius-lg;
    color: white;
    font-size: @text-base;
    transition: @transition-bounce;
    
    &::placeholder {
      color: rgba(255, 255, 255, 0.4);
    }
    
    &:hover {
      border-color: rgba(102, 126, 234, 0.5);
      background: rgba(255, 255, 255, 0.08);
      box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
    }
    
    &:focus, &.ant-input-focused {
      border-color: @primary-color;
      background: rgba(255, 255, 255, 0.1);
      box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 0 30px rgba(102, 126, 234, 0.3);
    }
  }
  
  .ant-form-item {
    margin-bottom: @spacing-md;
  }
  
  .register-button {
    height: 56px;
    border-radius: @radius-lg;
    background: @bg-gradient;
    border: none;
    font-size: @text-base;
    font-weight: 600;
    transition: @transition-bounce;
    position: relative;
    overflow: hidden;
    margin-top: @spacing-lg;
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      transition: left 0.6s;
    }
    
    &:hover {
      transform: translateY(-2px);
      box-shadow: @shadow-glow;
      
      &::before {
        left: 100%;
      }
    }
    
    &:active {
      transform: translateY(0px);
    }
  }
}

.register-footer {
  text-align: center;
  margin-top: @spacing-xl;
  
  p {
    color: rgba(255, 255, 255, 0.6);
    font-size: @text-sm;
    margin: 0 0 @spacing-md 0;
  }
  
  .login-link {
    color: @primary-color;
    font-weight: 500;
    padding: 0;
    height: auto;
    
    &:hover {
      color: @accent-color;
    }
  }
  
  .status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: @spacing-sm;
    color: rgba(255, 255, 255, 0.6);
    font-size: @text-xs;
    
    .status-dot {
      width: 8px;
      height: 8px;
      background: @success-color;
      border-radius: @radius-full;
      animation: status-blink 2s ease-in-out infinite;
      box-shadow: 0 0 10px rgba(82, 196, 26, 0.5);
    }
  }
}

@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

// 响应式设计
@media (max-width: 768px) {
  .register-form-wrapper {
    width: 400px;
    padding: @spacing-xl @spacing-lg;
  }
  
  .register-header .register-title {
    font-size: @text-3xl;
  }
}

@media (max-width: 480px) {
  .register-form-wrapper {
    width: 350px;
    padding: @spacing-lg @spacing-md;
  }
  
  .register-header .register-title {
    font-size: @text-2xl;
  }
}